package com.qyhl.webtv.module_live.teletext.detail.popview.detail;

import com.qyhl.webtv.commonlib.entity.live.ShoppingListBean;
import com.qyhl.webtv.commonlib.entity.live.ShoppingUserInfoBean;

public class TeleTextShopDetailPresenter implements TeleTextShopDetailContract.TeleTextShopDetailPresenter {
    private TeleTextShopDetailContract.TeleTextShopDetailView mView;
    private TeleTextShopDetailModel mModel;

    public TeleTextShopDetailPresenter(TeleTextShopDetailContract.TeleTextShopDetailView mView) {
        this.mView = mView;
        this.mModel = new TeleTextShopDetailModel(this);
    }

    @Override
    public void getDetail(String id) {
        mModel.getDetail(id);
    }

    @Override
    public void getStock(String id) {
        mModel.getStock(id);
    }

    @Override
    public void getUserInfo(String userName) {
        mModel.getUserInfo(userName);
    }

    @Override
    public void doOrder(String name, String phone, String itemId, String number) {
        mModel.doOrder(name, phone, itemId, number);
    }

    @Override
    public void setDetail(ShoppingListBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void setStock(int stock) {
        mView.setStock(stock);
    }

    @Override
    public void setUserInfo(ShoppingUserInfoBean bean) {
        mView.setUserInfo(bean);
    }

    @Override
    public void orderSuccess(String msg) {
        mView.orderSuccess(msg);
    }

    @Override
    public void orderError(String msg) {
        mView.orderError(msg);
    }
}
